﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace xlsx2const
{
    public class TreeView1 : TreeView {
        private const int WM_LBUTTONDBLCLK = 0x203;
        public event EventHandler DoubleClickBeforeExpand;

        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case WM_LBUTTONDBLCLK:
                    if (this.DoubleClickBeforeExpand != null)
                        this.DoubleClickBeforeExpand(this, EventArgs.Empty);
                    break;
            }
            base.WndProc(ref m);
        }
    }
}
